﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Globalization;

namespace Doves.Utilities
{
    public enum NodeType
    {
        ContentNode = 1,
        DescriptionNode
    }

    public static class Utils
    {
        public static DateTime ConvertToDateTime(string inDate, string inTime)
        {
            string DateTimeString = inDate + " " + inTime;
            DateTime ReturnDate = DateTime.Today;
            DateTime.TryParse(DateTimeString, GetCultureInfo(), DateTimeStyles.None, out ReturnDate);
            return ReturnDate;
        }

        private static CultureInfo GetCultureInfo()
        {
            return CultureInfo.CreateSpecificCulture("vi-VN");
        }

    }


    public class ReturnValue<T>
    {
        private T _retValue;
        private string _msg;
        public ReturnValue(T inA, string inMgs)
        {
            _retValue = inA;
            _msg = inMgs;
        }

        public T RetValue
        {
            get { return _retValue; }
            set { _retValue = value; }
        }
        public string Msg
        {
            get { return _msg; }
            set { _msg = value; }
        }

    }
}
